﻿#ifndef __DAHUA_GENICAM_USERSETCONTROL_H__
#define __DAHUA_GENICAM_USERSETCONTROL_H__

#include "Defs.h"
#include "ParameterNode.h"

GENICAM_NAMESPACE_BEGIN

class IUserSetControl;

typedef Memory::TSharedPtr<IUserSetControl> IUserSetControlPtr;

/// \ingroup config
/// @{

/// \~chinese
/// \brief Class IUserSetControl UserSetControl涓嫔睘镐ф搷浣灭被
/// \~english
/// \brief IUserSetControl's property operation class
class GENICAM_API IUserSetControl
{
public:
	virtual ~IUserSetControl() {}

public:
	enum EConfigSet
	{
		userSetDefault = 0,		///< \~chinese 鐩告満榛樿閰岖疆板嗗悎         ///< \~english camera default set
		userSet1 = 1,			///< \~chinese 銆愯鍐欍€戠浉链洪厤缃泦鍚?    ///< \~english camera user set 1 ( Can be read and written )
		userSet2 = 2,			///< \~chinese 銆愯鍐欍€戠浉链洪厤缃泦鍚?    ///< \~english camera user set 2 ( Can be read and written )
		userSetInvalid
	};

public:
	/// \~chinese
	/// \brief 鎭㈠鐩告満榛樿閰岖疆
	/// \return 鎴愬姛杩斿洖true锛屽惁鍒栾繑锲瀎alse
	/// \~english
	/// \brief restore camera's default configuration
	/// \return success:true, fail:false
	virtual bool restoreDefault() = 0;

	/// \~chinese
	/// \brief 璁剧疆鐩告満褰揿墠閰岖疆锛屽苟鐢熸晥涓斾笅娆′互璇ラ厤缃惎锷?
	/// \param [in] configSet 瑕佽缃殑閰岖疆板嗗悎
	/// \return 鎴愬姛杩斿洖true锛屽惁鍒栾繑锲瀎alse
	/// \~english
	/// \brief set current camera configuration, these configurations will take effect immediately and load this userset on next time when start camera
	/// \param [in] configSet configuration sets 
	/// \return success:true, fail:false
	virtual bool setCurrentUserSet(EConfigSet configSet = userSet1) = 0;

	/// \~chinese
	/// \brief 淇濆瓨鐩告満褰揿墠閰岖疆鍒版煇閰岖疆板嗗悎锛屽userSet1
	/// \param [in] configSet 瑕佷缭瀛桦埌镄勯厤缃泦鍚?
	/// \return 鎴愬姛杩斿洖true锛屽惁鍒栾繑锲瀎alse
	/// \~english
	/// \brief save current configuration into certain userset, for example, userSet1
	/// \param [in] configSet save the configuration sets
	/// \return success:true, fail:false
	virtual bool saveUserSet(EConfigSet configSet = userSet1) = 0;

	/// \~chinese
	/// \brief 銮峰彇鐩告満褰揿墠閰岖疆板嗗悎
	/// \return 杩斿洖閰岖疆板嗗悎鏋氢妇链?
	/// \~english
	/// \brief get current user set
	/// \return return enumeration value of configuration set 
	virtual EConfigSet getCurrentUserSet() = 0;

	/// \~chinese
	/// \brief 銮峰彇鐩告満褰揿墠UserSet鐩稿叧鏄惁鍙敤
	/// \return 鍙敤杩斿洖true锛屽惁鍒栾繑锲瀎alse
	/// \~english
	/// \brief get status of current user set and check whether it is available or not
	/// \return available:true, not available:false
	virtual bool isAvailable() const = 0;
};

/// @}

GENICAM_NAMESPACE_END

#endif // __DAHUA_GENICAM_USERSETCONTROL_H__
